home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 2 / AACD 2.iso / AACD / Magazine / GraphicsCards / StormMesa / src-glut / glut_tablet.c < prev    next >
C/C++ Source or Header  |  1998-12-15  |  1KB  |  34 lines

  1.  
  2. /* Copyright (c) Mark J. Kilgard, 1994. */
  3.  
  4. /* This program is freely distributable without licensing fees
  5.    and is provided without guarantee or warrantee expressed or
  6.    implied. This program is -not- in the public domain. */
  7.  
  8. #include <stdlib.h>
  9.  
  10. #include "glutint.h"
  11.  
  12. void APIENTRY 
  13. glutTabletMotionFunc(GLUTtabletMotionCB tabletMotionFunc)
  14. {
  15.   __glutCurrentWindow->tabletMotion = tabletMotionFunc;
  16.   __glutUpdateInputDeviceMaskFunc = __glutUpdateInputDeviceMask;
  17.   __glutPutOnWorkList(__glutCurrentWindow,
  18.     GLUT_DEVICE_MASK_WORK);
  19.   /* If deinstalling callback, invalidate tablet position. */
  20.   if (tabletMotionFunc == NULL) {
  21.     __glutCurrentWindow->tabletPos[0] = -1;
  22.     __glutCurrentWindow->tabletPos[1] = -1;
  23.   }
  24. }
  25.  
  26. void APIENTRY 
  27. glutTabletButtonFunc(GLUTtabletButtonCB tabletButtonFunc)
  28. {
  29.   __glutCurrentWindow->tabletButton = tabletButtonFunc;
  30.   __glutUpdateInputDeviceMaskFunc = __glutUpdateInputDeviceMask;
  31.   __glutPutOnWorkList(__glutCurrentWindow,
  32.     GLUT_DEVICE_MASK_WORK);
  33. }
  34.